package com.shiroha.video.pojo;

import com.mybatisflex.annotation.*;
import com.shiroha.common.handler.UUIDTypeHandler;
import com.shiroha.video.enums.WorkType;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.UUID;

/**
 * 作品表
 */
@Data
@Table(value = "work", schema = "public")
public class Work {
    @Id(keyType = KeyType.Auto)
    private Long id;                    // 作品ID

    @Column(typeHandler = UUIDTypeHandler.class)
    private UUID authorId;              // 作者ID
    private WorkType type;              // 作品类型
    private String title;               // 作品标题
    private String coverUrl = null;     // 封面 URL
    private String playUrl = null;      // 播放 URL
    private Long plays;                 // 播放量

    private boolean isDeleted;
    private LocalDateTime createdAt;
}
